{% extends "with_header.html" %}

{% block body %}
	<!-- Begin picture stuff -->

<br>
<table align="center" width="400px">
  <th>
    <p>{{ album_description }}</p>
  </th>
  {% for entry in entries %}
	  <tr><td><img src="{{ entry.content.src }}?imgmax=800"/><br>
    {% if entry.summary.text %}
	    {{ entry.summary.text }}<br>
    {% endif %}

	  {% ifnotequal entry.commentCount.text '0' %}
	    <table class='comments'>
	      <tbody>
      {% for item in comment_dict.items %}
        {% ifequal item.0 entry.gphoto_id.text %}
          {% for commententry in item.1 %}
            <!-- Begin comment -->
            <tr>
              <td class='comment-thumbnail' rowspan='2'>
                <a href="{{ commententry.comment.author.0.uri.text }}">
                <img src="{{ commententry.comment.author.0.thumbnail.text }}" style="float:left"/>
                </a>
              </td>
              <th width="100%">
                <a href="{{ commententry.comment.author.0.uri.text }}">
                  {{ commententry.comment.author.0.user.text }}
                </a>
              </th>
              <th class='comment-date'>
                {{ commententry.date|timesince }} ago
              </th>
              <!-- If this is the current user OR this is the owner of the feed -->
              <th>
              {% ifequal commententry.comment.author.0.user.text username %}
                <a href="delete">delete</a>
              {% endifequal %}
              </th>
            </tr>
            <tr>
              <td class='comment-text' colspan='3'>
                {{ commententry.comment.content.text }}
              </td>
            </tr>
            <!-- End comment -->
          {% endfor %}
        {% endifequal %}
      {% endfor %}
        </tbody>
      </table>
    {% endifnotequal %}
	  <br><br><br>
	{% endfor %}

	</td></tr>
</table>
<!-- End picture stuff -->
{% endblock %}
